package com.woniuxy.income.feign;

import com.woniuxy.core.model.GetOrdersByStallIdAndTimeForm;
import com.woniuxy.core.model.Result;
import com.woniuxy.order.dao.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

@FeignClient(name = "order-server")
@ComponentScan
public interface OrderClient {

    @PostMapping("/order/orderInfo/getOrderInfosByStallIds")
    Result<List<OrderInfo>> getOrderInfosByStallIds(@RequestBody Set<Integer> stallIds);
    @PostMapping("/order/orderInfo/getOrdersByStallIdAndTime")
    List<OrderInfo> getOrdersByStallIdAndTime(@RequestBody GetOrdersByStallIdAndTimeForm form);
    @GetMapping("/order/orderInfo/getTodayIncomeByCerId")
    Result<String> getTodayIncomeByCerId(@RequestParam("certifiedInfoId") Integer certifiedInfoId);
    @GetMapping("/order/orderInfo/platGetTodayIncome")
    Result<String> platGetTodayIncome();
    @GetMapping("/order/orderInfo/renterGetTodayInCome")
    Result<String> renterGetTodayInCome(@RequestParam("renterId") Integer renterId);
    @GetMapping("/order/orderInfo/cerGetMonthInCome")
    Result<String> cerGetMonthInCome(@RequestParam("certifiedInfoId") Integer certifiedInfoId);
    @GetMapping("/order/orderInfo/platGetMonthInCome")
    Result<String> platGetMonthInCome();
    @GetMapping("/order/orderInfo/renterGetMonthInCome")
    Result<String> renterGetMonthInCome(@RequestParam("renterId") Integer renterId);
}
